<?php
require_once(__PHY_LIB.'/func/Common.func.php');
require_once(__PHY_LIB.'/class/Session.class.php'); new Session();
require_once(__PHY_LIB.'/class/AdmUser.class.php');
require_once(__PHY_LIB.'/class/Tpl.class.php');

/// login ///
if (!$_SESSION['ADM_USER_ID']) {
	die('You are not logged in.');
}

/// init ///
$oTpl = new Tpl();
$oTpl->assignConst();
$_br = "<br />\n";

/// _ME ///
global $_ME;
$_ME = new AdmUser($_SESSION['ADM_USER_ID'], 'id,user_ename,user_cname,parent_id,grantable');
$oTpl->assign('_ME', $_ME->getData());

/// _THE ///
global $_THE;
$_THE = array(
	'Depth' => 1,
	'Dir' => 'admin/',
	'AdmFunc' => $_SERVER['SCRIPT_NAME'],
	'FileBase' => basename($_SERVER['SCRIPT_NAME'], '.php'),
);
$oTpl->assign('_THE', $_THE);
?>
